/**
 * File    : Audit.java
 * Created : 2008-9-25
 * By      : LuHuiguo
 */
package com.luhuiguo.sso.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.EntityListeners;
import javax.persistence.MappedSuperclass;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.apache.tapestry5.beaneditor.NonVisual;

/**
 * 
 * @author LuHuiguo
 * @version $Id: AuditableEntity.java 16 2008-10-17 13:13:27Z LuHuiguo $
 * 
 */
@SuppressWarnings("serial")
@MappedSuperclass
@EntityListeners(AuditableListener.class)
public abstract class AuditableEntity extends BaseEntity implements Auditable {

	@NonVisual
	@Column(updatable = false)
	private String creator;

	@NonVisual
	@Column(updatable = false)
	@Temporal(TemporalType.TIMESTAMP)
	private Date createDate;

	@NonVisual
	private String modifier;

	@NonVisual
	@Temporal(TemporalType.TIMESTAMP)
	private Date modifyDate;

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getModifier() {
		return modifier;
	}

	public void setModifier(String modifier) {
		this.modifier = modifier;
	}

	public Date getModifyDate() {
		return modifyDate;
	}

	public void setModifyDate(Date modifyDate) {
		this.modifyDate = modifyDate;
	}

}
